
import java.util.Arrays;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: WHY
 * Date: 2022-11-29
 * Time: 13:36
 */
public class TestDemo {
//合并两个有序数组
    public void merge(int A[], int m, int B[], int n) {
        if(A == null || B == null){
            return ;
        }
        for(int i = m,j = 0;i<A.length && j<n;i++,j++){
            A[i] = B[j];
        }
        Arrays.sort(A);//按从小到大排序
    }

}

